
#ifndef  __DBG_cli_h_
#define  __DBG_cli_h_



typedef int (*debug_func)( void * pctx, int argc, const char **argv );


typedef struct _tag_cmd_proc {
	const char * cmd;
	debug_func  func;
	void * parg;
	
	struct _tag_cmd_proc * next;
	
} cmd_proc_t;

int  debug_add_cmd( const char * cmd, debug_func func, void * parg );

/**/
int  debug_str2uint( const char * str, uint32_t * pu32 );
void  debug_dump_hex( uint8_t * ptr, size_t len );

/**/
int debug_cli_init( void );
int debug_proc_line( char * spad );

/* console */
int cons_readline( const char * prompt, int max, char * spad );

#endif

